<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page import="com.fzu.ess.sys.entity.User" %>
<%@ page import="com.fzu.ess.common.Const" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
//    String avatar = (String) session.getAttribute(Const.SESSION.AVATAR);
//    System.out.println("avatar: " + avatar);

    User user =  (User) session.getAttribute(Const.SESSION.USER);
//    String username = user.getUsername();
    pageContext.setAttribute("userId", user.getId());
//    User user = (User) session.getAttribute("avatar");
%>
<!-- user message -->
<div class="media user-media bg-dark dker">
    <div class="user-media-toggleHover">
        <span class="fa fa-user"></span>
    </div>
    <div class="user-wrapper bg-dark">
        <a class="user-link" href="">
            <img class="media-object img-thumbnail user-img" src="${avatar}" width="50px" height="50px" alt="暂无头像" >
            <%--<span class="label label-danger user-label">16</span>--%>
        </a>
        <div class="media-body">
            <ul class="list-unstyled user-info">
                <li><a href="">${user.username}</a></li>
                <%--<li>最后访问 :<br>--%>
                    <%--<small>--%>
                        <%--<i class="fa fa-calendar"></i>--%>
                        <%--&nbsp;11 月 11 日 23:00--%>
                    <%--</small>--%>
                <%--</li>--%>
            </ul>
        </div>
    </div>
</div>